package com.myraff.viz;

import java.util.Arrays;

public class Histogram extends Chart {
	
	private int binsize;
	
	private Ntuple<Integer> bar_width;
	
	public Histogram(int[] data, int myBinsize) {
		super("bvs",data);
		binsize = myBinsize;
		
		int len_data = data.length;
		
		/* Calculate bins */
		int datamin = Tools.min(data);
		int datamax = Tools.max(data);
		
		int lower_bin_bound = (datamin/binsize) * binsize;
		int upper_bin_bound = (datamax/binsize + 1) * binsize;
		int numbins = (upper_bin_bound - lower_bin_bound)/binsize;
		
		final_data = new int[numbins];
		for (int i=0; i<len_data; i++) 
			final_data[(data[i]-datamin)/binsize]++;
		
		/* Find max bin height */
		int maxy = -1;
		for (int i=0; i<numbins; i++)
			if (final_data[i] > maxy) 
				maxy = final_data[i];
		
		final_data = adjustForEncoding(final_data,maxy);
		
		/* bar properties */
		int binwidth = image_width/numbins;
		
		/* spacing */
		bar_width = new Ntuple<Integer>(binwidth,0,0);
		
		/* Make x-axis */
		addAxis("x");
		/* Calculate the x-axis scale */
		addAxisRanges(0, 0, binwidth * numbins);
		
		String[] labels = new String[numbins+1];
		Integer[] positions = new Integer[numbins+1];
		for (int i=0; i<numbins; i++) {
			labels[i] = Integer.toString(lower_bin_bound + i*binsize);
			positions[i] = i*binwidth;
		}
		labels[numbins] = Integer.toString(lower_bin_bound + numbins*binsize);
		positions[numbins] = numbins*binwidth;
		addAxisLabels(0, labels);
		
		addAxisPositions(0, positions);
		
		/* Make y-axis */
		addAxis("y");
		addAxisRanges(1, 0, maxy);
	}
	
	public static void main (String[] args) {
		int[] points = {40,57,43,67,49,43,56,31,78,59,47,44,28,49,39,44,43,39,52,53,45,38,51,48,59,52,44,51,47,55,64,58,52,50,61,37,34,49,53,58,38,40,49,51,42,54,45,30,46,48,57,63,45,55,46,35,63,55,43,47,55,50,40,52,26,52,39,53,46,42,48,58,61,53,40,62,49,37,40,51,35,40,54,29,62,52,48,38,62,50,58,61,68,38,63,58,48,55,54,69,70,50,52,48,61,59,30,31,54,32,41,56,52,45,42,68,49,73,43,58,62,68,47,47,39,44,40,50,52,42,51,53,48,54,32,38,48,52,60,29,47,44,33,48,35,55,43,59,38,52,53,32,48,59,43,55,47,35,45,45,53,60,50,41,49,41,34,52,57,60,57,39,66,56,53,48,42,52,31,47,23,47,69,54,51,55,45,47,49,63,67,55,64,46,51,30,23,52,61,53,54,30,55,60,37,48,50,36,60,50,61,41,56,46,39,53,46,40,51,49,61,42,59,36,45,31,40,48,47,59,48,51,47,55,57,58,49,32,66,73,43,54,55,54,28,44,52,60,41,61,49,77,50,50,46,61,47,43,49,44,35,45,43,57,45,40,37,46,63,60,57,74,53,57,53,37,50,35,53,55,44,40,59,42,50,42,67,61,46,47,47,59,30,54,62,50,63,53,40,51,52,45,52,62,56,47,29,50,58,56,60,45,56,36,54,54,37,55,51,50,77,60,35,44,52,56,46,51,59,36,46,29,58,55,15,67,47,69,45,44,40,52,60,61,47,53,57,44,45,55,52,58,62,42,39,59,69,62,55,32,44,39,41,46,52,50,49,64,43,31,51,33,31,64,59,53,54,66,37,58,70,52,73,54,52,69,60,37,48,42,49,50,52,57,40,63,53,48,53,36,57,58,41,53,63,43,46,49,42,32,41,44,38,43,42,42,56,44,55,49,28,55,54,41,64,46,59,43,59,43,55,42,51,50,53,39,63,56,47,53,45,62,53,45,50,35,55,42,57,46,33,52,51,56,49,55,61,67,32,63,42,45,58,45,48,58,53,55,49,47,46,54,50,36,69,44,46,65,24,69,52,38,52,55,63,50,39,44,62,54,60,65,65,42,40,77,54,50,56,40,41,37,47,51,58,42,42,51,51,36,60,37,64,49,31,60,43,38,40,42,53,51,28,58,31,52,49,46,68,50,60,39,42,48,43,50,42,45,58,38,41,51,57,51,57,42,40,61,44,59,47,35,37,51,48,50,47,50,63,48,49,51,65,64,41,42,27,60,33,55,76,66,48,45,42,50,56,63,40,55,49,31,25,72,54,66,49,50,37,38,37,42,28,43,49,33,28,41,55,45,67,47,50,43,41,53,60,54,60,45,41,46,42,57,36,44,50,53,47,50,56,42,55,42,41,38,40,40,57,57,48,59,53,61,38,28,53,56,45,56,58,50,58,22,48,34,37,52,54,53,54,39,54,38,42,41,43,44,46,37,51,34,46,41,53,45,34,60,33,48,35,54,57,59,49,41,55,45,34,35,49,69,44,41,64,45,60,39,66,49,37,49,49,47,51,58,41,33,55,45,40,47,40,40,49,49,48,49,51,59,43,46,48,44,65,36,63,64,38,61,35,39,57,40,68,47,49,50,55,56,44,37,42,44,56,67,35,40,45,56,57,57,44,46,41,47,49,31,57,58,46,41,48,49,63,60,74,55,50,44,31,47,69,58,54,65,43,37,49,43,49,55,61,59,60,55,69,53,64,47,38,49,25,46,58,52,58,48,38,49,63,49,32,65,61,52,38,47,50,49,39,48,28,57,40,55,51,62,38,51,47,54,39,43,71,62,41,41,43,48,38,52,50,49,30,55,57,43,56,56,56,68,73,63,57,34,50,49,48,50,49,53,52,41,37,45,61,45,41,39,43,48,40,60,37,47,61,68,49,55,44,45,48,45,42,64,42,50,46,48,51,43,39,24,29,49,47,63,58,42,59,60,58,39,62,34,56,48,42,48,65,53,45,46,59,44,65,43,36,39,41,53,53,60,52,50,42,47,46,49,28,49,46,43,45,40,51,55,28,67,61,43,54,62,49,34,50,46,59,41,45,51,65,46,35,46,52,51,70,40,30,39,48,54,55,54,56,44,49,42,44,30,43,38,56,61,48,42,35,41,43,46,50,42,61,49,52,50,53,56,60,37,43,45,51,51,45,50,50,39,49,43,54,53,39,34,55,45,56,57,31,46,40,57,53,46,46,46,52,61,46,60,58,48,49,43,71,48,47,44,48,50,62,46,41,63,43,40,28,43,69,60,50,32,49,75,52,54,51,65,41,59,64,37,60,35,44,46,59,64,66,51,44,62,69,49,42,48,64,46,61,40,44,48,66,31,57,35,47,40,57,57,58,41,52,61,44,58,45,35,52,49,52,47,37,52,36,57,57,43,53,46,60,41,51,53,51,53,45,45,48,53,43,46,48,56,47,53,66,54,47,54,42,55,44,60,43,43,49,43,49,63,50,38,53,43,51,24,53,49,54,54,57,69,49,39,54,54,42,48,42,45,51,50,55,42,64,46,44,64,49,48,57,37,42,52,45,52,65,51,49,42,63,58,58,45,58,51,52,51,46,56,49,59,52,49,50,58,47,56,64,60,47,46,47,41,45,46,30,45,44,40,35,61,55,49,45,45,49,44,53,35,65,35,41,33,60,59,59,51,63,45,47,43,44,65,33,48,54,46,68,46,37,53,55,62,54,29,35,50,48,60,34,63,24,54,34,59,54,44,55,33,52,50,34,64,53,47,49,47,32,40,40,40,70,57,27,38,49,52,48,45,70,40,47,30,47,55,62,44,39,31,36,53,47,36,59,52,53,44,55,40,55,34,68,44,47,49,58,70,50,52,57,68,47,49,58,61,57,39,31,42,41,67,40,51,60,59,48,30,50,33,60,60,31,37,41,52,46,58,53,62,52,50,69,49,66,61,46,41,51,63,46,49,57,52,39,54,17,48,59,42,36,56,68,47,67,55,41,50,60,55,53,52,50,45,46,62,56,50,28,62,67,54,51,57,40,40,67,41,58,56,38,65,38,24,53,30,67,37,63,33,42,54,36,41,53,36,61,48,38,53,61,50,38,50,48,27,40,26,57,60,45,37,61,74,45,44,42,41,53,43,43,30,53,34,71,46,55,34,56,47,66,74,45,38,38,64,51,60,45,57,36,60,39,56,53,50,49,47,60,47,40,65,35,54,37,71,57,56,47,49,42,50,35,66,52,46,49,45,39,63,31,40,26,47,57,51,29,58,42,44,49,41,60,58,41,40,41,57,54,40,53,55,48,56,61,49,63,49,58,61,41,49,48,36,25,47,48,41,47,36,47,46,70,43,53,47,38,50,58,53,35,35,39,33,42,43,40,41,41,48,65,38,53,57,33,53,59,48,38,30,48,36,54,52,58,32,39,43,44,58,46,54,53,20,50,52,52,73,46,48,59,29,63,74,45,45,37,64,68,43,59,68,47,43,47,64,43,46,78,43,49,51,48,49,43,38,52,48,57,45,52,50,50,64,52,56,27,55,52,56,52,60,46,38,60,40,53,41,54,60,40,60,50,50,47,46,53,30,40,28,39,76,36,50,44,60,49,46,61,46,46,54,51,41,68,52,55,48,47,52,55,44,61,72,47,40,50,45,34,49,47,62,62,55,49,49,58,50,39,50,49,41,49,52,35,34,54,45,54,36,27,46,50,45,59,43,39,38,50,54,43,51,55,22,45,56,48,59,44,47,45,60,35,41,46,48,43,56,33,56,42,55,59,37,36,47,49,36,48,83,54,60,47,39,44,58,63,54,62,54,58,57,39,54,60,36,52,71,60,58,53,53,51,60,52,46,44,52,62,53,53,44,52,63,27,61,50,44,68,49,49,43,40,50,53,26,62,45,58,56,45,54,44,70,58,54,49,69,50,38,38,50,50,39,45,37,29,32,41,67,57,57,54,67,61,48,53,68,59,39,69,46,41,55,38,41,57,47,54,67,51,39,46,63,46,53,45,69,57,50,47,46,63,46,69,63,42,55,65,48,53,64,45,59,40,51,37,45,50,73,54,54,51,49,47,46,24,49,57,33,32,60,54,52,58,51,43,63,77,67,50,65,39,40,50,30,47,49,39,47,55,37,49,72,45,53,50,54,45,39,43,49,40,68,54,56,63,50,58,54,48,56,47,52,57,41,46,52,49,46,35,42,52,58,60,42,60,32,71,50,35,54,53,53,83,41,52,40,51,53,39,54,34,58,43,48,36,58,55,34,42,48,62,48,58,40,34,38,30,46,39,50,39,56,63,54,71,54,46,55,44,49,40,44,46,38,47,58,51,42,50,58,52,61,68,47,42,48,48,66,42,57,51,59,31,59,56,48,62,66,47,53,45,45,44,44,54,59,64,45,55,75,43,20,29,31,37,43,26,48,41,31,46,52,66,51,57,62,74,37,52,48,58,69,28,46,69,50,39,68,45,39,75,43,57,55,71,51,47,53,53,39,58,33,34,44,36,28,67,49,39,65,60,30,60,66,62,51,27,66,54,44,27,31,66,53,49,27,32,40,35,49,49,53,53,51,62,47,55,51,59,54,66,42,45,42,60,58,54,50,48,49,42,63,44,49,59,62,58,32,38,40,49,51,51,38,49,40,57,46,40,31,50,50,50,51,34,25,59,44,42,48,59,47,46,48,52,68,54,55,48,48,58,53,49,53,54,48,51,62,54,41,33,38,40,51,22,41,34,57,40,69,54,44,55,50,55,46,56,70,38,65,57,48,43,32,66,41,49,41,58,53,66,53,28,49,51,56,56,52,55,41,30,35,50,37,61,55,32,45,50,57,51,55,40,73,37,51,72,44,67,49,56,54,48,40,51,49,52,38,47,44,52,68,64,52,53,52,53,42,34,42,36,52,61,46,56,55,43,67,44,53,56,54,43,40,43,47,56,38,51,43,41,52,37,58,50,53,49,28,56,26,53,64,78,45,45,44,65,49,58,50,57,48,41,44,32,62,40,66,54,39,42,41,67,52,48,51,59,45,55,25,63,25,58,41,35,44,36,34,54,49,52,51,50,37,26,46,54,46,47,51,57,28,67,52,38,45,50,25,54,38,70,32,53,47,40,37,32,58,60,56,39,74,39,50,54,49,35,49,51,14,59,76,53,33,34,27,34,46,49,58,32,33,53,53,43,44,54,54,51,47,57,41,46,54,58,61,49,59,57,45,45,43,42,57,43,42,50,47,42,65,53,42,52,65,62,43,41,38,60,64,51,50,43,54,60,29,52,63,51,45,54,41,48,54,55,63,50,46,59,42,63,68,37,47,60,37,58,61,54,36,40,65,67,44,56,35,56,59,23,58,63,41,61,60,45,44,54,63,43,59,56,39,45,45,37,51,68,58,42,47,48,39,59,49,40,16,53,37,63,27,52,43,60,49,48,41,62,38,61,47,54,43,43,44,55,53,59,45,58,45,47,49,43,39,47,75,40,51,48,53,50,55,56,57,65,48,56,47,46,50,57,68,62,58,40,26,70,40,47,59,37,46,40,42,46,63,35,33,50,67,50,63,65,39,55,38,42,56,49,46,52,51,72,31,60,35,34,51,51,42,51,58,55,49,50,43,75,46,22,59,46,46,61,49,41,53,58,46,45,41,52,31,42,24,64,57,59,38,51,58,52,43,73,41,58,51,34,35,45,32,37,56,66,57,58,59,27,37,47,56,42,42,52,59,61,47,51,49,69,40,47,52,46,46,69,51,52,48,59,51,45,59,64,64,54,33,61,39,36,34,63,47,28,34,51,52,52,64,38,51,48,53,35,55,55,43,52,41,32,57,49,41,37,77,41,47,45,36,42,45,52,39,31,40,42,52,51,35,40,42,55,52,46,60,28,65,55,62,35,57,46,48,56,41,45,41,39,41,48,66,41,53,59,59,49,45,63,52,54,65,66,44,64,36,66,30,52,50,50,48,49,57,42,49,46,67,48,45,42,53,42,46,46,64,59,47,48,25,65,34,53,48,64,52,28,55,73,59,52,73,58,65,44,50,40,71,42,53,44,51,49,62,49,54,66,38,37,55,46,47,52,49,47,44,53,58,45,63,39,55,56,43,52,55,48,44,69,40,41,42,58,42,45,50,52,37,50,45,45,57,61,50,44,65,28,47,67,47,54,49,46,61,42,41,61,40,45,45,63,47,49,55,47,35,35,54,43,66,42,40,37,60,67,50,48,32,45,57,74,47,52,60,56,33,47,56,46,64,45,58,65,36,73,68,45,65,59,47,41,63,60,41,41,40,51,48,66,53,47,51,59,38,42,65,58,39,45,59,56,43,57,41,68,40,47,30,64,55,49,39,53,65,41,54,46,59,42,63,39,61,52,42,52,55,51,59,37,58,55,51,37,51,50,47,53,54,49,29,25,55,54,61,62,44,42,40,48,61,43,51,65,60,52,57,62,61,46,60,51,61,43,55,61,73,69,52,51,48,66,53,51,42,43,50,48,44,51,49,52,59,56,54,43,42,55,45,52,35,70,58,54,54,53,40,62,37,19,41,52,40,47,62,56,62,39,51,60,41,32,48,45,58,55,53,39,60,36,50,55,57,42,48,32,58,41,40,67,63,58,37,18,39,53,55,40,40,46,55,40,44,54,40,53,56,60,61,54,50,54,30,60,47,51,33,27,35,52,48,56,55,39,46,37,55,30,48,60,41,63,52,45,36,54,52,50,58,46,38,44,28,51,37,48,44,50,51,33,57,51,50,59,58,50,53,47,53,52,62,31,64,27,52,42,35,49,45,38,64,41,58,49,46,47,50,49,40,50,55,51,59,60,54,37,59,37,53,61,47,48,46,63,38,45,56,38,53,43,58,67,55,63,55,31,66,50,61,31,60,56,45,56,55,51,49,54,39,33,41,51,71,52,52,50,55,43,48,31,65,51,55,50,40,50,48,29,43,55,63,48,49,52,48,35,48,41,61,39,31,54,37,50,54,36,54,62,60,49,59,51,55,33,33,51,61,50,45,48,58,47,42,57,43,68,54,37,55,41,59,50,48,43,43,63,50,37,52,31,35,55,52,30,47,46,58,51,35,47,53,67,38,63,63,52,39,44,39,50,45,48,46,40,46,52,38,49,54,32,57,56,33,44,41,38,42,48,49,50,51,56,49,29,57,60,60,43,30,61,44,62,53,39,52,47,39,55,47,59,50,58,35,37,39,68,42,44,37,47,40,55,39,49,55,54,53,68,50,67,36,52,68,35,54,47,66,71,52,52,55,67,54,61,52,55,53,38,60,58,52,45,63,61,48,54,55,54,49,44,60,51,52,50,32,65,69,59,46,62,48,46,20,44,43,40,45,68,52,37,36,50,51,43,45,44,51,48,67,51,30,59,43,49,58,48,39,52,63,66,56,65,69,57,45,57,44,49,68,45,55,52,60,46,52,52,41,60,59,68,42,59,62,63,37,53,61,45,45,48,29,44,62,48,56,37,67,40,53,48,59,60,60,74,59,51,63,58,42,40,44,55,54,44,44,62,37,49,64,52,48,36,56,30,55,49,40,31,46,54,52,47,48,50,40,49,42,40,30,52,55,62,51,42,37,53,50,38,45,50,44,20,31,50,62,66,59,47,38,51,49,59,66,44,49,60,48,49,33,63,48,41,47,54,41,49,49,41,46,58,55,67,43,55,53,38,25,39,39,57,46,49,40,41,61,42,70,56,51,42,46,58,47,51,62,47,49,52,45,61,56,65,46,33,43,43,30,51,47,54,51,51,52,45,46,41,57,75,44,63,68,63,51,25,21,39,44,58,46,46,48,45,56,60,51,36,30,48,43,48,65,45,49,50,52,49,31,40,33,59,45,36,40,50,66,52,56,37,34,41,38,52,47,56,42,51,68,55,33,32,43,32,59,18,54,30,35,59,49,29,33,52,40,52,58,54,38,60,58,51,52,53,70,69,48,61,45,39,32,54,38,50,41,43,56,40,31,44,40,50,47,52,65,51,48,44,54,49,48,59,63,45,62,33,45,52,74,46,64,60,56,41,40,52,42,62,43,30,58,52,35,42,54,56,55,58,41,58,49,53,30,51,61,66,52,45,57,46,56,43,52,71,45,37,52,49,51,48,52,32,56,63,54,29,51,44,37,35,45,47,60,53,58,56,57,47,50,44,53,41,51,56,53,53,57,39,51,59,63,59,52,59,45,59,51,56,68,14,50,47,52,44,51,69,48,57,49,40,39,63,45,40,47,51,60,39,42,48,32,65,61,44,44,58,36,47,54,52,50,54,65,52,55,29,42,50,61,49,54,36,50,50,50,44,61,27,48,50,54,44,51,65,63,51,76,53,55,56,49,46,50,37,54,55,36,41,64,59,24,50,32,47,45,40,43,56,66,48,44,39,60,37,52,50,54,43,42,40,40,62,62,43,23,55,49,39,40,58,55,52,44,52,59,60,51,43,53,54,43,58,62,41,44,45,55,42,56,42,56,45,60,51,52,45,44,54,71,54,48,27,42,51,59,50,63,57,56,48,53,53,44,53,36,50,53,57,61,56,50,53,44,52,50,51,49,52,33,42,45,42,39,52,49,60,39,64,34,45,36,41,34,36,55,54,43,49,52,65,49,43,48,50,59,36,42,36,63,45,69,48,49,52,38,50,50,49,53,40,55,37,41,41,51,58,64,57,66,54,47,75,55,58,45,39,39,67,33,38,51,45,59,63,55,63,63,46,54,49,42,64,64,59,64,35,72,39,45,56,37,31,47,48,46,49,54,33,42,66,59,49,55,58,69,59,37,32,30,56,61,38,65,63,41,50,28,44,40,25,53,58,71,67,50,44,53,47,40,62,64,47,52,42,51,27,44,38,33,49,47,65,48,59,52,46,59,51,59,63,50,53,51,46,50,51,51,32,40,35,49,65,45,54,59,43,56,29,45,18,63,54,65,49,45,41,56,52,51,29,52,48,52,56,41,49,32,52,50,54,52,48,61,44,51,44,52,45,50,48,60,48,63,49,54,47,42,41,60,53,48,53,45,47,56,45,45,67,47,40,46,35,48,36,47,72,71,49,68,46,76,59,55,26,44,53,57,43,45,60,52,45,63,58,32,29,46,45,59,47,33,53,37,60,60,35,63,38,70,55,40,55,54,46,35,57,50,32,56,44,57,23,48,58,38,53,47,43,48,68,71,61,46,64,46,68,53,53,79,48,56,59,50,51,29,47,53,61,37,50,50,65,34,58,66,52,48,60,48,61,53,46,66,43,44,53,46,47,51,43,48,51,62,51,49,58,64,59,42,64,79,42,51,54,56,53,45,64,56,55,66,69,46,39,68,53,58,63,44,39,45,64,66,48,55,53,68,39,39,59,39,60,51,46,52,48,62,44,45,32,34,37,43,45,59,45,51,46,24,69,23,49,64,44,35,50,57,49,34,53,56,43,38,44,52,33,32,49,52,58,54,61,41,61,58,74,49,59,66,44,60,61,49,62,43,59,53,47,65,51,52,51,49,47,47,54,53,37,53,66,49,53,37,50,48,61,54,68,36,53,40,43,54,46,34,20,40,56,61,30,43,43,37,42,31,49,53,50,46,50,45,52,40,29,54,36,43,58,61,61,51,49,42,44,55,44,45,38,49,47,59,41,56,69,46,59,44,51,46,36,40,51,27,49,45,41,47,52,62,45,51,70,68,40,45,55,47,59,61,49,56,43,42,46,50,50,45,49,53,65,25,54,59,41,50,50,42,53,41,40,29,36,59,65,40,51,25,46,55,59,42,53,53,49,51,38,38,70,43,62,45,55,44,35,58,48,54,43,45,69,54,49,40,30,52,48,52,43,38,40,40,67,55,50,38,71,60,50,41,59,50,45,67,59,60,52,51,43,43,49,51,36,55,57,39,48,35,50,36,48,44,68,38,38,42,51,58,63,43,43,45,56,37,65,51,37,50,53,53,52,49,34,61,44,44,62,53,47,52,54,60,44,29,54,42,54,57,47,47,58,44,56,67,57,64,62,47,69,54,35,61,42,51,38,56,47,55,42,43,32,30,56,42,55,47,60,46,42,44,41,63,43,50,62,57,65,58,52,34,60,65,54,54,52,50,47,42,66,51,37,53,62,60,49,39,44,51,62,34,68,64,40,38,51,54,42,44,52,50,31,37,46,37,63,50,61,42,52,63,59,46,56,51,49,40,38,62,63,62,42,48,48,52,48,45,44,53,53,49,65,54,53,50,36,50,52,46,53,47,45,52,63,37,20,45,56,35,48,43,31,45,38,44,51,49,34,43,57,50,63,37,48,36,35,48,52,48,27,51,43,70,45,52,44,29,42,47,56,60,42,38,36,53,53,59,29,46,51,43,49,51,42,46,47,38,63,48,42,37,34,62,46,45,66,47,37,65,50,53,60,55,51,47,53,56,45,43,33,33,43,40,60,48,61,45,53,61,36,45,43,49,53,60,49,53,40,50,46,73,53,42,58,40,60,51,30,49,54,44,37,42,41,55,78,46,66,34,41,55,49,53,41,47,35,58,38,48,46,54,48,52,39,43,46,57,43,74,35,69,31,51,45,56,48,47,56,64,56,39,47,34,43,26,48,45,52,57,49,63,32,58,55,55,44,39,58,51,50,53,41,54,64,60,48,62,64,59,41,62,57,37,53,55,61,36,39,47,49,54,69,43,62,44,62,49,43,47,32,33,44,41,58,59,39,57,51,43,53,55,48,43,60,53,55,41,46,42,51,30,44,60,65,49,56,62,65,63,52,55,39,44,45,56,73,44,49,43,63,56,66,51,40,57,33,43,51,46,34,59,41,39,45,46,50,63,34,51,57,52,70,58,59,56,59,44,51,52,44,19,50,46,37,57,58,48,50,40,51,49,54,73,46,40,42,37,47,48,57,61,61,59,54,58,56,56,44,55,55,41,52,57,39,68,52,55,70,48,48,58,56,62,55,35,51,69,60,34,42,42,57,48,56,47,54,53,50,50,25,47,29,53,61,66,40,51,37,47,43,68,48,66,56,54,37,49,78,56,46,29,56,55,50,30,45,40,50,64,58,58,49,47,54,36,54,46,61,43,53,48,59,57,44,50,49,55,33,46,48,42,41,65,55,36,53,51,40,41,38,59,41,64,46,53,54,50,38,63,41,47,36,49,31,52,48,46,32,60,39,43,34,46,38,63,33,51,50,35,45,45,35,23,46,50,46,42,45,40,49,56,55,49,46,46,58,52,59,47,31,65,58,60,40,42,59,49,42,51,39,43,54,57,54,42,55,55,53,49,44,57,67,55,39,54,61,70,40,39,55,63,51,54,33,54,43,37,57,73,51,45,56,47,56,52,53,46,52,44,51,51,58,52,51,47,46,50,63,55,34,53,59,52,55,31,54,47,45,38,57,39,53,51,38,61,57,42,31,44,51,50,41,40,43,56,56,58,43,57,55,55,43,53,39,57,28,53,52,58,47,48,55,42,49,63,51,54,47,43,53,60,44,59,50,63,58,51,47,51,63,49,46,45,61,43,26,47,49,36,44,57,30,45,52,25,50,69,46,50,43,44,50,56,29,63,27,67,59,53,47,46,43,46,41,73,44,38,43,50,68,54,48,52,69,29,46,40,52,51,32,52,39,26,51,44,40,28,54,63,53,40,39,46,53,61,54,61,45,51,45,52,39,58,63,51,54,46,56,45,73,63,59,36,59,72,28,67,46,47,71,64,44,30,38,45,53,45,56,62,54,45,51,61,44,63,43,43,61,46,34,62,45,39,59,44,19,62,57,53,55,52,40,43,62,28,35,26,58,52,33,56,53,71,39,40,56,54,67,39,48,55,53,52,38,50,61,49,46,38,49,37,55,52,56,53,43,52,57,53,56,65,67,45,59,70,51,34,46,44,46,54,50,47,51,56,34,59,49,47,39,62,39,62,56,38,41,21,58,36,39,50,35,49,54,45,53,42,39,55,45,50,45,28,69,58,48,42,46,24,55,40,50,36,59,36,53,37,45,43,52,38,44,44,39,49,49,51,41,33,42,49,57,47,44,60,51,63,52,53,46,40,47,57,73,51,57,40,36,56,52,49,47,51,26,60,60,58,68,51,52,55,47,46,59,51,55,46,60,56,45,43,41,46,41,63,66,56,38,56,53,29,46,50,39,30,46,67,55,45,57,74,62,39,34,48,44,55,53,64,56,50,39,52,23,53,58,52,44,70,49,50,37,20,35,38,38,50,28,45,55,36,57,67,71,44,49,58,39,41,62,50,56,83,45,32,48,63,46,51,43,70,60,40,48,28,40,60,27,65,53,43,71,55,35,42,40,45,53,56,50,20,57,44,48,43,48,53,44,49,63,50,64,41,40,47,47,43,49,60,45,45,43,65,33,31,47,50,41,47,56,43,47,45,66,49,60,59,45,57,46,48,54,48,60,65,58,43,53,59,56,47,53,41,40,50,43,35,48,40,52,51,42,59,42,40,58,29,57,54,50,61,44,52,51,23,49,42,54,50,40,33,42,47,60,44,65,46,52,36,58,42,38,53,51,50,31,59,57,52,50,63,58,44,61,60,47,31,62,50,54,44,51,47,57,66,33,52,51,71,44,46,48,53,46,52,57,36,48,65,54,60,61,46,43,50,55,39,62,47,53,35,41,51,52,40,61,58,38,41,60,64,36,51,47,48,52,39,47,43,48,52,37,57,37,49,51,45,45,55,49,56,51,43,58,60,58,58,57,45,53,45,64,62,54,26,46,58,57,57,55,60,73,45,41,50,28,59,46,41,60,38,47,62,55,53,49,40,47,47,47,64,40,56,69,39,53,41,46,35,47,56,44,41,62,41,41,37,52,32,67,47,63,28,43,46,42,43,68,42,61,43,69,47,43,54,45,39,43,37,48,50,62,41,47,44,62,55,33,47,40,57,46,65,48,57,30,63,50,53,38,48,39,57,49,40,55,65,55,70,40,38,42,52,62,53,36,50,60,45,24,57,73,61,36,44,57,64,59,47,46,24,42,50,54,55,47,55,51,45,52,43,46,47,58,31,31,48,44,61,46,56,53,50,53,56,34,50,40,59,57,57,42,59,53,72,41,51,63,37,33,48,58,51,43,53,54,61,36,29,40,53,54,50,48,58,41,49,67,48,48,40,55,49,26,66,53,50,34,64,30,76,47,44,57,42,69,68,61,42,43,49,35,50,52,63,57,35,33,33,65,34,48,49,44,35,44,39,55,50,49,37,50,38,39,49,22,66,57,50,50,55,47,54,47,51,44,60,60,63,41,30,33,53,51,38,51,46,33,52,51,60,57,51,62,50,57,59,74,51,53,35,68,57,55,56,61,53,45,41,42,45,52,52,44,52,49,52,58,55,38,41,52,34,64,54,39,41,46,38,60,61,44,45,75,68,58,42,52,57,49,38,42,54,56,45,34,46,54,44,50,53,44,25,40,54,52,51,51,51,43,55,46,31,60,45,40,52,51,71,43,46,32,65,47,51,37,55,47,50,45,47,56,43,59,27,50,44,64,43,55,40,43,52,70,53,54,58,34,34,56,63,48,53,46,62,38,44,75,70,55,49,35,44,63,56,50,61,59,53,49,57,38,42,66,53,65,50,38,63,48,28,73,42,50,34,58,41,55,53,45,41,46,54,66,36,45,52,43,54,50,41,51,54,43,44,49,30,58,48,63,52,48,45,42,54,48,55,55,43,45,57,51,44,37,43,47,62,53,41,54,55,58,37,52,75,50,53,61,60,48,49,53,54,57,34,42,35,48,34,60,63,61,37,32,59,63,43,56,55,40,54,65,53,46,56,37,40,54,52,33,43,43,36,58,55,52,33,50,48,53,34,46,54,38,51,50,52,33,33,51,38,62,29,55,57,54,29,19,31,64,51,53,61,62,36,65,57,56,51,58,33,56,64,51,43,67,61,54,47,38,49,32,41,44,49,48,60,62,52,57,59,47,51,39,63,53,39,46,61,69,51,45,45,59,49,33,50,42,60,33,31,43,61,42,48,54,58,53,55,39,55,61,53,49,55,60,49,48,45,49,37,64,41,44,55,48,41,57,45,55,38,24,51,48,52,37,43,55,42,60,42,40,49,52,58,55,52,49,68,51,63,24,57,53,51,56,43,58,40,48,56,51,50,51,32,56,48,58,53,57,58,55,51,41,59,40,48,52,49,51,76,50,48,36,59,35,48,27,46,47,40,47,49,41,45,47,47,44,59,25,58,48,41,46,48,42,29,58,63,36,56,38,25,53,35,71,39,64,34,55,38,42,37,30,56,52,42,53,45,40,60,55,43,49,53,66,53,44,49,52,43,43,41,58,49,54,45,45,29,60,50,51,46,52,59,50,42,51,39,46,52,29,65,58,56,51,62,55,34,29,48,52,43,49,51,41,53,47,39,56,55,38,51,53,29,46,38,54,43,50,57,44,53,55,39,38,38,42,45,59,55,37,24,54,63,41,49,39,39,48,46,41,49,48,33,36,32,50,53,50,61,65,62,55,59,44,64,51,50,32,59,49,57,50,65,46,42,51,44,42,48,46,57,33,31,51,38,57,58,61,65,56,69,57,63,45,40,34,68,49,38,38,39,55,42,58,40,62,51,51,81,38,49,43,22,52,62,63,32,75,37,45,56,63,50,42,73,32,46,38,46,53,46,55,69,40,65,49,39,55,54,54,43,49,62,53,52,60,57,59,35,38,32,63,63,48,61,62,54,54,42,37,51,42,53,44,54,45,45,48,44,64,57,51,47,60,56,47,35,49,48,68,56,46,28,40,37,34,74,56,31,52,49,60,37,49,31,70,58,34,54,50,44,47,69,38,52,51,38,43,46,42,47,45,50,47,31,67,42,43,49,54,28,41,46,41,43,42,47,41,54,48,53,37,56,45,49,63,53,35,51,69,39,68,43,44,70,57,48,63,72,54,28,50,52,63,61,51,54,47,35,49,72,45,43,54,58,70,67,26,63,54,56,46,45,38,61,33,40,50,53,80,48,37,38,60,54,35,43,35,52,48,53,43,45,61,56,57,58,57,46,43,48,43,39,55,41,45,49,52,43,32,48,36,50,60,55,52,56,66,49,53,53,56,47,48,47,55,57,55,45,48,48,57,27,53,51,67,31,61,55,53,53,51,62,31,36,28,52,40,54,31,52,45,39,70,30,32,57,59,43,63,52,51,56,66,53,43,63,55,51,36,40,63,31,48,39,60,40,55,31,44,50,39,55,37,52,48,42,42,42,38,63,39,54,68,59,42,50,58,67,37,34,58,57,35,32,46,74,56,39,50,59,47,57,45,49,57,54,48,38,51,52,65,40,54,42,50,45,40,54,64,39,57,59,38,64,50,50,59,32,28,60,54,44,67,50,36,28,44,43,44,42,44,51,29,34,44,48,51,47,39,49,43,61,62,31,52,35,36,42,46,71,52,53,61,72,62,58,68,41,50,53,63,38,67,49,50,58,33,73,49,35,67,57,49,53,60,42,47,59,47,54,46,53,52,53,46,43,61,43,57,57,43,55,61,55,61,63,29,61,44,60,71,37,57,59,53,45,57,45,57,37,55,36,56,39,59,43,60,51,37,46,60,64,45,34,56,46,34,46,49,50,32,49,53,58,50,36,42,57,49,37,55,47,34,43,61,45,41,46,53,52,42,60,50,52,47,55,55,80,61,25,59,43,54,78,40,56,59,27,60,44,34,64,35,47,48,51,29,34,62,69,54,60,45,55,62,49,41,33,63,40,37,53,40,44,51,47,55,63,59,38,50,36,58,47,58,49,36,56,45,42,44,49,60,40,59,36,48,51,47,38,44,38,51,67,50,41,63,51,44,67,45,51,53,56,43,60,57,52,48,53,53,48,49,51,50,44,60,47,45,43,47,42,51,60,34,52,54,70,53,61,52,47,59,59,70,19,45,54,55,63,42,49,46,49,48,54,49,37,60,40,47,54,56,49,41,77,67,47,57,60,64,55,39,65,58,57,38,69,48,59,45,47,48,32,42,52,36,47,37,28,44,57,43,44,58,56,49,41,44,45,65,46,58,64,55,55,59,46,40,24,35,39,38,28,29,57,63,34,56,46,59,52,57,44,37,42,45,47,83,59,43,42,52,66,64,36,47,38,60,51,39,70,44,47,36,52,57,54,60,39,32,59,49,43,73,26,56,46,35,38,49,60,40,70,43,36,40,44,56,44,61,54,41,36,43,57,59,32,35,59,37,39,54,65,55,63,43,63,49,59,73,59,48,37,40,57,43,53,30,54,56,43,57,39,49,54,59,47,37,53,30,41,50,47,44,54,38,49,57,55,48,37,45,62,49,57,49,33,53,42,40,63,39,50,52,36,46,63,48,43,50,47,40,63,39,58,47,59,47,55,40,52,34,55,33,51,51,30,49,40,59,48,63,63,39,51,50,57,56,58,55,43,44,61,51,45,64,56,59,62,50,51,61,48,45,80,45,24,51,61,46,49,62,51,49,56,37,47,61,33,43,70,35,59,29,40,61,60,38,48,31,61,44,42,62,43,50,45,42,56,58,40,28,51,56,38,50,28,44,57,44,60,45,62,63,52,48,42,32,59,50,62,50,67,48,50,58,46,37,39,43,53,56,32,45,45,40,48,45,39,31,65,53,47,38,46,69,41,32,43,56,53,66,64,31,48,51,60,47,35,47,42,49,33,53,40,62,34,62,50,59,38,46,44,33,42,50,34,51,43,31,42,52,51,37,37,40,51,47,30,47,35,55,34,50,57,49,50,17,44,50,34,35,52,56,49,60,80,44,52,44,61,43,48,54,61,38,50,53,42,39,48,42,71,37,63,40,47,54,68,53,60,55,41,46,50,50,42,33,55,38,28,54,39,48,49,63,50,42,57,23,57,35,48,56,55,54,43,52,45,69,54,44,46,38,65,48,57,61,45,47,44,56,43,63,36,52,38,36,46,39,53,58,59,53,47,38,54,56,57,54,62,62,36,47,46,43,42,43,38,46,55,17,61,47,54,53,51,37,53,74,45,72,54,56,49,54,33,45,61,39,56,46,56,57,40,45,54,46,49,37,45,48,56,72,72,53,48,46,63,37,45,50,50,61,50,47,45,65,72,31,48,54,46,69,38,64,63,50,50,43,37,57,49,38,31,55,36,62,43,34,44,61,46,78,46,33,68,57,43,57,48,43,44,55,56,53,41,74,56,53,52,49,53,55,35,47,49,61,41,39,60,43,71,50,50,57,40,36,59,58,23,56,51,62,65,50,47,49,62,52,49,58,58,53,54,54,52,53,33,46,55,41,43,54,42,55,49,21,32,52,42,41,47,38,52,46,66,58,26,58,69,52,38,50,50,40,54,56,59,37,64,43,56,40,44,33,47,44,42,54,50,58,49,62,48,56,46,51,50,39,53,35,57,38,48,38,45,43,43,35,34,48,62,53,62,53,50,41,56,59,53,48,57,66,63,48,47,35,59,40,57,58,41,61,39,65,67,54,49,47,31,50,54,42,64,67,55,43,46,35,58,30,57,29,60,41,57,58,56,47,48,28,34,41,45,40,46,51,49,53,53,44,71,56,54,68,48,53,28,51,39,61,54,38,46,49,36,59,46,49,37,51,53,66,49,72,48,46,62,52,49,28,65,55,45,46,46,56,60,58,42,48,37,33,45,35,40,51,40,50,63,47,51,35,67,52,36,51,52,54,61,52,53,47,54,48,32,61,45,39,42,47,72,54,50,54,46,54,28,51,55,46,51,46,55,37,40,50,42,66,42,65,57,43,60,47,66,34,68,52,54,55,39,60,41,43,48,44,59,37,40,66,59,38,63,59,38,43,27,53,34,34,33,34,56,51,44,44,42,50,52,40,50,36,53,28,54,57,59,58,24,43,43,55,53,44,46,44,60,45,55,41,49,50,51,47,60,37,61,27,64,35,44,23,46,58,48,57,56,44,59,60,42,35,65,52,40,39,59,49,39,39,42,39,45,51,36,59,49,69,44,36,27,37,44,46,54,25,60,57,53,64,64,38,48,47,51,49,53,46,41,65,60,60,65,41,66,48,40,49,37,58,44,25,51,41,41,57,41,41,40,36,55,53,49,46,63,48,45,37,42,59,29,67,57,53,51,51,44,62,62,40,60,54,27,56,62,48,48,54,43,46,65,41,63,55,44,49,62,43,38,37,41,50,49,44,45,53,70,41,38,39,65,52,40,31,49,51,47,52,57,56,45,55,63,69,53,51,55,44,42,37,52,31,43,62,56,67,56,49,67,53,50,45,55,39,60,47,39,59,52,38,50,41,52,53,62,49,83,59,41,57,49,55,37,27,53,26,68,41,55,25,50,53,37,47,50,51,47,50,61,40,53,53,68,49,69,27,44,59,44,51,53,49,43,41,35,38,36,53,39,60,44,31,63,37,61,79,56,52,48,55,59,62,45,47,58,34,52,71,44,39,26,63,58,55,46,50,41,56,49,40,52,44,42,34,33,55,58,53,48,45,49,39,55,59,43,68,46,47,39,65,43,48,37,47,63,44,50,48,34,53,48,36,37,49,57,51,75,46,53,53,59,47,55,44,61,31,59,58,42,52,49,62,21,49,58,55,38,42,40,54,56,54,52,14,58,65,46,43,42,34,52,49,73,63,38,33,67,35,41,54,59,41,39,50,28,56,58,37,63,39,63,49,56,46,41,41,49,56,53,46,52,45,47,59,59,50,64,48,51,35,52,52,55,52,45,61,54,35,68,64,40,46,38,63,38,69,57,51,40,61,47,48,65,45,42,62,50,64,33,29,57,40,39,47,49,64,60,48,58,56,47,56,55,42,41,36,40,48,56,59,51,61,55,52,57,72,42,47,40,47,65,67,51,49,46,49,48,52,40,46,48,56,58,44,52,57,40,43,37,53,37,37,49,63,39,47,47,45,40,56,50,61,51,60,43,43,53,55,45,49,57,45,51,31,44,52,70,49,26,51,37,39,54,63,51,60,30,57,67,64,49,74,45,36,47,60,51,38,40,42,65,44,37,62,50,47,38,62,47,62,55,58,29,47,50,56,64,63,49,68,43,56,63,37,48,38,47,53,57,61,56,49,51,51,49,64,60,41,50,70,43,63,43,55,44,57,51,57,42,49,44,55,46,44,50,51,60,52,39,65,59,58,58,31,63,47,44,45,80,52,38,35,47,42,65,69,58,58,47,44,41,52,53,42,41,48,50,55,37,31,70,56,53,67,54,47,51,45,68,31,39,44,42,41,59,53,62,61,43,50,53,51,61,70,50,23,60,47,57,55,43,48,59,47,55,53,30,41,42,46,62,56,41,48,51,49,49,42,40,69,38,29,48,64,38,62,55,45,56,41,52,42,42,51,62,37,44,58,42,61,37,46,52,71,62,71,45,54,54,50,46,44,42,42,46,52,58,49,40,49,43,42,47,50,61,47,57,51,51,40,38,58,53,68,51,54,64,44,65,47,56,45,43,51,31,49,35};
		Histogram h = new Histogram(points,2);
		System.out.println(h.getURL());
	}
	
	public String getSpacingString() {
		return bar_width.toString();
	}
	
	public String getURL() {
		return super.getURL() + Names.separator + Names.BAR_WIDTH_SPACING + "=" + getSpacingString(); 
	}

}
